
public class TestChain {

    public static void main(String[] args) {
        MyHandler accountHandler = new VerifyAccountHandler();
        MyHandler roleHandler = new VerifyRoleHandler();
        MyHandler premissionHandler = new VerifyPermissionHandler();

        accountHandler.next(roleHandler);
        roleHandler.next(premissionHandler);

        LoginUser loginUser = new LoginUser();
        loginUser.setLoginName("孤狼1号");
        loginUser.setPassword("123456");
        loginUser.setRoleName("admin");
        loginUser.setPermission("admin");

        accountHandler.doHandler(loginUser);
    }
}